/******************************************************************************/
package jamie.org.sil.www.usxUtils;

import java.util.ArrayList;
import java.util.Iterator;


/******************************************************************************/
/**
 * An iterator which runs over all files in a folder.
 * <p>
 * 
 * Note that this class interacts very closely with {@link BookAssembly}, qv.
 * 
 * @author Jamie
 */

public class BookAssemblyAllFilesInInputFolderIterator implements Iterator<BookElement>
{
  public BookAssemblyAllFilesInInputFolderIterator () { m_FileDetails = BookAssembly.instance().getFileDetailsFromInputFolder(); }
  @Override public boolean hasNext () { return m_Ix < m_FileDetails.size(); }
  @Override public BookElement next () { return m_FileDetails.get(m_Ix++); }
  @Override public void remove () {}
  private ArrayList<BookElement> m_FileDetails = new ArrayList<BookElement>();
  private int m_Ix = 0;
}
